//
//  LCLeftDrawerCell.m
//  JKScanTool
//
//  Created by Abner on 16/5/23.
//  Copyright © 2016年 YM. All rights reserved.
//  左边抽屉用的cell

#import "LCLeftDrawerCell.h"

@implementation LCLeftDrawerCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        NSLog(@"7777777777777-----celllllllll");
        self.textLb = [[UILabel alloc]initWithFrame:CGRectMake(10, 0, KleftViewW-28, 43)];
        self.textLb.font = [UIFont systemFontOfSize:14];
        self.textLb.textColor = SetColorRGBValue(0xc0c0c0, 1.0);
        [self.contentView addSubview:self.textLb];
        
        
        self.arrowImgView = [[UIImageView alloc]initWithFrame:CGRectMake(KleftViewW-18, 14.5, 8, 14)];
        self.arrowImgView.image = [UIImage imageNamed:@"jiantou"];
        [self.contentView addSubview:self.arrowImgView];
        
        self.bottomLine = [[UIView alloc]initWithFrame:CGRectMake(0, 43, KleftViewW, 1)];
        self.bottomLine.backgroundColor = SetColorRGBValue(0x444750, 1.0);
        [self.contentView addSubview:self.bottomLine];
        
    }
    return self;
}

-(void)setupCellWithTitle:(NSString *)aTitle showLine:(BOOL)showLine
{
    self.textLb.text = aTitle;
    if (showLine) {
        self.bottomLine.hidden = NO;
        
    }else{
        self.bottomLine.hidden = YES;

    }
}
+(instancetype)cellWithTableView:(UITableView *)tableView
{
    static NSString *indetifier = @"LCLeftDrawerCellIdentifier";
    LCLeftDrawerCell *cell = [tableView dequeueReusableCellWithIdentifier:indetifier];
    if (!cell) {
        cell = [[LCLeftDrawerCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:indetifier];
    }
    return cell;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
